import App from './App'
import store from './store'
import storage from '@/utils/storage'
import moment from 'moment'
import utils from '@/utils'
import '@/mock/api'
import {
	BASE
} from '@/const/base.js'
import {permis, permisList} from '@/utils/permis.js'

// #ifndef VUE3
import Vue from 'vue'
import uView from '@/uni_modules/uview-ui'
import './uni.promisify.adaptor'
Vue.use(uView)
uni.$u.setConfig({
	// 修改$u.config对象的属性
	config: {
		// 修改默认单位为rpx，相当于执行 uni.$u.config.unit = 'rpx'
		unit: 'rpx'
	},
	// 修改$u.props对象的属性
	props: {
		// 修改radio组件的size参数的默认值，相当于执行 uni.$u.props.radio.size = 30
		radio: {
			size: 32,
			labelSize: 28,
			iconSize: 24
		},
		switch: {
			size: 36
		},
		icon: {
			size: 28
		},
		loadmore: {
			fontSize: 28,
			iconSize: 34
		},
		checkbox: {
			size: 36,
			iconSize: 28,
			labelSize: 28,
		},
		// 其他组件属性配置
		// ......
	}
})
Vue.config.productionTip = false
App.mpType = 'app'
Vue.prototype.$store = store
Vue.prototype.$moment = moment
Vue.prototype.$utils = utils
Vue.prototype.$storage = storage
Vue.prototype.$ossUrl = BASE.ossUrl
Vue.prototype.$base = BASE
Vue.prototype.$permis = permis
Vue.prototype.$permisList = permisList
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif